<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>创建新元素</title>
</head>

<body>
    <script type="text/javascript">
        var creat_div = document.createElement("div");
        var eme_text = document.createTextNode("Hello World!");
        creat_div.appendChild(eme_text);
        document.body.appendChild(creat_div);
    </script>

</body>

</html>